import React from 'react';
import {HeaderButtons, Item} from 'react-navigation-header-buttons'; //专门用于导航栏按钮的库

interface IProps {
  title: string;
  onSubmit: () => void;
}

const HeaderRightBtn: React.FC<IProps> = props => {
  const {title, onSubmit} = props;
  return (
    <HeaderButtons>
      <Item title={title} onPress={onSubmit} />
    </HeaderButtons>
  );
};

export default HeaderRightBtn;
